<template>
  <div class="container">
    <div class="ansewr-num">
      <div>
        <div>
          <span>很遗憾您只答对了</span>
          <span class="num">{{ $route.query.socre }}</span>题，
        </div>
        <div>全部答对才可抽奖哦！</div>
      </div>
    </div>
    <div class="advance">
      <img src="@/assets/bg_un.png" alt class="bg">
      <img src="@/assets/bg_advance.png" alt class="k">
      <div class="cont">
        <div class="title">明日奖品预告</div>
        <div v-for="(temp, index) in prizeList" v-show="index<2" :key="index" class="list">
          {{ temp.prize_level }}等奖: {{ temp.prize }}
        </div>
      </div>
      <router-link to="/home">
        <button>返回首页</button>
      </router-link>
    </div>
    <!-- <div class="sign">想要今日奖品？不妨让朋友试试！</div> -->
  </div>
</template>

<script>
import { tomorrow } from '@/api/utils'
export default {
    data() {
        return {
            prizeList: []
        }
    },
    async created() {
        console.log(this.$route.query)
        const res = await tomorrow()
        this.prizeList = res.data || []
        if (this.prizeList.length === 0) {
            this.prizeList.push({ list: '暂无预告' })
        }
    }
}
</script>
<style lang="less" scoped>
.container {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  .ansewr-num {
    // border: 1px solid;
    text-align: center;
    align-items: center;
    display: flex;
    height: 50px;
    justify-content: center;
    padding: 60px 0 30px;
    font-size: 19px;
    font-weight: bold;
    letter-spacing: 2px;
    .num {
      color: #543ad0;
      font-size: 22px;
    }
  }
  .advance {
    position: relative;
    .bg {
      width: 100%;
      position: relative;
    }
    .k {
      width: 100%;
      position: absolute;
      top: 12%;
      left: 10%;
      width: 80%;
    }
    .cont {
      position: absolute;
      width: 74%;
      top: 20%;
      left: 13%;
      height: 160px;
      .title {
        font-size: 20px;
        color: #543ad0;
        text-align: center;
        font-weight: bold;
        padding-bottom: 20px;
      }
      .list {
        font-size: 14px;
        text-align: center;
        font-weight: bold;
        color: #4076fb;
        padding: 5px 0;
      }
    }
    button {
      background: #ffd737;
      border: none;
      padding: 0 3px;
      color: #93500d;
      width: 80%;
      font-size: 20px;
      height: 45px;
      line-height: 45px;
      border-radius: 20px;
      font-weight: bold;
      position: relative;
      top: -35px;
    }
  }

  .sign {
    text-align: center;
    font-size: 14px;
    margin-top: 15px;
    color: #93500d;
  }
}
</style>
